import { URI } from "@/services/api";
import { request, METHOD } from "@/utils/request";

export async function getInventorys(itemCode, labelId, originalCode, minQty, maxQty, location, wareCode, status, pageSize, pageIndex) {
    return request(`${URI}/Inventory/GetData`, METHOD.GET, {
        itemCode,
        labelId,
        originalCode,
        minQty: minQty !== null ? minQty : '',
        maxQty: maxQty !== null ? maxQty : '',
        location,
        wareCode,
        status: status !== null ? status : '',
        pageSize,
        pageIndex
    });
}


export async function getInventoryLog(itemCode, labelId, itemDesc, docNum, location, type, pageSize, pageIndex) {
    return request(`${URI}/InventoryLog/GetData`, METHOD.GET, { itemCode, labelId, itemDesc, docNum, location, type, pageSize, pageIndex });
}

export default {
    getInventorys,
    getInventoryLog
};
